﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Smartdispatch
{
    /// <summary>
    /// 流程图
    /// </summary>
    public class FlowChart
    {
        /// <summary>
        /// 唯一标识
        /// </summary>
        public Guid ID { get; set; } = Guid.NewGuid();
        /// <summary>
        /// 父节点标识 
        /// </summary>
        public Guid? ParentID { get; set; }
        /// <summary>
        /// 是否是成立条件
        /// 父节点不一定是判定条件值就为NULL
        /// </summary>
        public bool? ParentLeft { get; set; }
        /// <summary>
        /// 判断名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 显示信息
        /// </summary>
        public string Remarks { get; set; }
        /// <summary>
        /// 层次，用于排序
        /// </summary>
        public int Floor { get; set; }
        /// <summary>
        /// 是否执行的
        /// 是就点亮
        /// </summary>
        public bool Run { get; set; } = false;
        /// <summary>
        /// 最终结果
        /// </summary>
        public bool Result { get; set; }
        
        public int Mode { get; set; }


    }
    /// <summary>
    /// 步骤记录
    /// </summary>
    public class Steps
    {
        /// <summary>
        /// 步骤基数
        /// </summary>
        public string Id { get; set; }
        
        /// <summary>
        /// 步骤详细
        /// </summary>
        public  string Remarks { get; set; }

    }
    public  class TagNameEntity
    {
        /// <summary>
        /// 展览馆压力
        /// </summary>
        public  float ZhanLanGuan { get; set; }
        /// <summary>
        /// 正府街压力
        /// </summary>
        public  float ZhengFuJie { get; set; }
        /// <summary>
        /// 需水情况
        /// </summary>
        public  Trend TrendOfWater { get; set; }
        /// <summary>
        /// 调度模式
        /// </summary>
        public DispacthMod Dispacth { get; set; }

        public static int Step { get; set; }
        /// <summary>
        ///  控制时间节点预测用水量
        /// </summary>
        public float UseWater_17 { get; set; }
    }

    public class CommandOut
    {
        /// <summary>
        /// SCADA展示命令
        /// </summary>
        public string CmdoutText { get; set; }
        /// <summary>
        /// 站点名
        /// </summary>
        public string TagName { get; set; }
        /// <summary>
        /// 命令
        /// </summary>
        public string Cmd { get; set; }
        /// <summary>
        /// 数值1
        /// </summary>
        public float? Value1 { get; set; }
        /// <summary>
        /// 数值2
        /// </summary>
        public float? Value2 { get; set; }
    }
    /// <summary>
    /// 水六厂
    /// </summary>
    public class WaterFactory_6
    {
        /// <summary>
        /// 实时流速
        /// </summary>
        public float RealSpeed { get; set; }
        /// <summary>
        /// 六厂A三期清水池液位
        /// </summary>
        public float Pool3 { get; set; }
        /// <summary>
        /// 供水能力
        /// </summary>
        public float Ability { get; set; }
    }
  /// <summary>
  /// 水七厂
  /// </summary>
    public class WaterFactory_7
    {
        /// <summary>
        /// 实时流速
        /// </summary>
        public float RealSpeed { get; set; }
        /// <summary>
        /// 七厂清水池液位
        /// </summary>
        public float Pool { get; set; }
        /// <summary>
        /// 供水能力
        /// </summary>
        public float Ability { get; set; }

    }
  /// <summary>
  /// 水二厂
  /// </summary>
    public class WaterFactory_2
    {
        /// <summary>
        /// 实时流速
        /// </summary>
        public float RealSpeed { get; set; }
        /// <summary>
        /// 车台开启情况
        /// </summary>
        public bool[] RideState { get; set; }
        /// <summary>
        /// 供水能力
        /// </summary>
        public float Ability { get; set; }
        /// <summary>
        /// 可开启车台数
        /// </summary>
        public int Canopenridenum { get; set; }
    }
    /// <summary>
    /// 水五厂
    /// </summary>
    public class WaterFactory_5
    {
        /// <summary>
        /// 可开启车台数
        /// </summary>
        public int Canopenridenum { get; set; }
        /// <summary>
        /// 实时流速
        /// </summary>
        public float RealSpeed { get; set; }
        /// <summary>
        /// 车台开启情况
        /// </summary>
        public bool[] RideState { get; set; }
        /// <summary>
        /// 供水能力
        /// </summary>
        public float Ability { get; set; }
    }
    /// <summary>
    /// 塔子山加压站
    /// </summary>
    public class Tazishan
    {
        /// <summary>
        /// 可开启车台数
        /// </summary>
        public int Canopenridenum { get; set; }
        /// <summary>
        /// 实时供水流速
        /// </summary>
        public float RealOutSpeed { get; set; }
        /// <summary>
        /// 实时注水流速
        /// </summary>
        public float RealInSpeed { get; set; }
        /// <summary>
        /// 车台开启情况
        /// </summary>
        public bool[] RideState { get; set; }
        /// <summary>
        /// 清水池液位
        /// </summary>
        public float Pool { get; set; }
        /// <summary>
        /// 目标液位（区间）小
        /// </summary>
        public  float TargetPoolMin { get; set; }
        /// <summary>
        /// 目标液位（区间）大
        /// </summary>
        public float TargetPoolMax { get; set; }
        /// <summary>
        /// 底面积
        /// </summary>
        public float Squat { get; set; }
        /// <summary>
        /// 供水能力
        /// </summary>
        public float Ability { get; set; }
    }
    /// <summary>
    /// 洪河加压站
    /// </summary>
    public class HongHe
    {
        /// <summary>
        /// 可开启车台数
        /// </summary>
        public int Canopenridenum { get; set; }
        /// <summary>
        /// 底面积
        /// </summary>
        public float Squat { get; set; }
        /// <summary>
        /// 实时供水流速
        /// </summary>
        public float RealOutSpeed { get; set; }
        /// <summary>
        /// 实时注水流速
        /// </summary>
        public float RealInSpeed { get; set; }
        /// <summary>
        /// 车台开启情况
        /// </summary>
        public bool[] RideState { get; set; }
        /// <summary>
        /// 清水池液位
        /// </summary>
        public float Pool { get; set; }
        /// <summary>
        /// 目标液位（区间）小
        /// </summary>
        public float TargetPoolMin { get; set; }
        /// <summary>
        /// 目标液位（区间）大
        /// </summary>
        public float TargetPoolMax { get; set; }
        /// <summary>
        /// 供水能力
        /// </summary>
        public float Ability { get; set; }
    }
    /// <summary>
    /// 凤凰加压站
    /// </summary>
    public class FengHuang
    {
        /// <summary>
        /// 可开启车台数
        /// </summary>
        public int Canopenridenum { get; set; }
        /// <summary>
        /// 底面积
        /// </summary>
        public float Squat { get; set; }
       
        /// <summary>
        /// 实时供水流速
        /// </summary>
        public float RealOutSpeed { get; set; }
        /// <summary>
        /// 实时注水流速
        /// </summary>
        public float RealInSpeed { get; set; }
        /// <summary>
        /// 车台开启情况
        /// </summary>
        public bool[] RideState { get; set; }
        /// <summary>
        /// 清水池液位
        /// </summary>
        public float Pool { get; set; }
        /// <summary>
        /// 目标液位（区间）小
        /// </summary>
        public float TargetPoolMin { get; set; }
        /// <summary>
        /// 目标液位（区间）大
        /// </summary>
        public float TargetPoolMax { get; set; }
        /// <summary>
        /// 供水能力
        /// </summary>
        public float Ability { get; set; }
    }
    /// <summary>
    /// 土门控流站
    /// </summary>
    public class TuMen
    {
        /// <summary>
        /// A阀门调节
        /// </summary>
        public bool ACtrl { get; set; }
        /// <summary>
        /// B阀门调节
        /// </summary>
        public bool BCtrl { get; set; }
        /// <summary>
        /// 自动调节
        /// </summary>
        public bool AutoCtrl { get; set; }
        /// <summary>
        /// 前压
        /// </summary>
        public float Pressure_A { get; set; }
        /// <summary>
        /// 后压
        /// </summary>
        public float Pressuer_B { get; set; }
        /// <summary>
        /// 前后压差
        /// </summary>
        public float SubPressure { get; set; }
        /// <summary>
        /// 前阀开启度
        /// </summary>
        public float Open_A { get; set; }
        /// <summary>
        /// 后阀开启度
        /// </summary>
        public float Open_B { get; set; }

    }
    /// <summary>
    /// 土桥控流站
    /// </summary>
    public class TuQiao
    {
        /// <summary>
        /// A阀门调节
        /// </summary>
        public bool ACtrl { get; set; }
        /// <summary>
        /// B阀门调节
        /// </summary>
        public bool BCtrl { get; set; }
        /// <summary>
        /// 自动调节
        /// </summary>
        public bool AutoCtrl { get; set; }
        /// <summary>
        /// 前压
        /// </summary>
        public float Pressure_A { get; set; }
        /// <summary>
        /// 后压
        /// </summary>
        public float Pressuer_B { get; set; }
        /// <summary>
        /// 前后压差
        /// </summary>
        public float SubPressure { get; set; }
        /// <summary>
        /// 前阀开启度
        /// </summary>
        public float Open_A { get; set; }
        /// <summary>
        /// 后阀开启度
        /// </summary>
        public float Open_B { get; set; }
    }
    /// <summary>
    /// 青杠控流站
    /// </summary>
    public class QiaoGang
    {
        /// <summary>
        /// A阀门调节
        /// </summary>
        public bool ACtrl { get; set; }
        /// <summary>
        /// B阀门调节
        /// </summary>
        public bool BCtrl { get; set; }
        /// <summary>
        /// 自动调节
        /// </summary>
        public bool AutoCtrl { get; set; }
        /// <summary>
        /// 前压
        /// </summary>
        public float Pressure_A { get; set; }
        /// <summary>
        /// 后压
        /// </summary>
        public float Pressuer_B { get; set; }
        /// <summary>
        /// 前后压差
        /// </summary>
        public float SubPressure { get; set; }
        /// <summary>
        /// 前阀开启度
        /// </summary>
        public float Open_A { get; set; }
        /// <summary>
        /// 后阀开启度
        /// </summary>
        public float Open_B { get; set; }
    }
    /// <summary>
    /// 清波控流站
    /// </summary>
    public class QingBo
    {
        /// <summary>
        /// A阀门调节
        /// </summary>
        public bool ACtrl { get; set; }
        /// <summary>
        /// B阀门调节
        /// </summary>
        public bool BCtrl { get; set; }
        /// <summary>
        /// 自动调节
        /// </summary>
        public bool AutoCtrl { get; set; }
        /// <summary>
        /// 前压
        /// </summary>
        public float Pressure_A { get; set; }
        /// <summary>
        /// 后压
        /// </summary>
        public float Pressuer_B { get; set; }
        /// <summary>
        /// 前后压差
        /// </summary>
        public float SubPressure { get; set; }
        /// <summary>
        /// 前阀开启度
        /// </summary>
        public float Open_A { get; set; }
        /// <summary>
        /// 后阀开启度
        /// </summary>
        public float Open_B { get; set; }
    }
    /// <summary>
    /// 郎家控流站
    /// </summary>
    public class LangJia
    {
        /// <summary>
        /// A阀门调节
        /// </summary>
        public bool ACtrl { get; set; }
        /// <summary>
        /// B阀门调节
        /// </summary>
        public bool BCtrl { get; set; }
        /// <summary>
        /// 自动调节
        /// </summary>
        public bool AutoCtrl { get; set; }
        /// <summary>
        /// 前压
        /// </summary>
        public float Pressure_A { get; set; }
        /// <summary>
        /// 后压
        /// </summary>
        public float Pressuer_B { get; set; }
        /// <summary>
        /// 前后压差
        /// </summary>
        public float SubPressure { get; set; }
        /// <summary>
        /// 前阀开启度
        /// </summary>
        public float Open_A { get; set; }
        /// <summary>
        /// 后阀开启度
        /// </summary>
        public float Open_B { get; set; }
    }
    /// <summary>
    /// 南北大道控流站
    /// </summary>
    public class NanBei
    {
        /// <summary>
        /// A阀门调节
        /// </summary>
        public bool ACtrl { get; set; }
        /// <summary>
        /// B阀门调节
        /// </summary>
        public bool BCtrl { get; set; }
        /// <summary>
        /// 自动调节
        /// </summary>
        public bool AutoCtrl { get; set; }
        /// <summary>
        /// 前压
        /// </summary>
        public float Pressure_A { get; set; }
        /// <summary>
        /// 后压
        /// </summary>
        public float Pressuer_B { get; set; }
        /// <summary>
        /// 前后压差
        /// </summary>
        public float SubPressure { get; set; }
        /// <summary>
        /// 前阀开启度
        /// </summary>
        public float Open_A { get; set; }
        /// <summary>
        /// 后阀开启度
        /// </summary>
        public float Open_B { get; set; }
    }
    /// <summary>
    /// 方桥一期控流站
    /// </summary>
    public class FangQiao1
    {
        /// <summary>
        /// A阀门调节
        /// </summary>
        public bool ACtrl { get; set; }
        /// <summary>
        /// B阀门调节
        /// </summary>
        public bool BCtrl { get; set; }
        /// <summary>
        /// 自动调节
        /// </summary>
        public bool AutoCtrl { get; set; }
        /// <summary>
        /// 前压
        /// </summary>
        public float Pressure_A { get; set; }
        /// <summary>
        /// 后压
        /// </summary>
        public float Pressuer_B { get; set; }
        /// <summary>
        /// 前后压差
        /// </summary>
        public float SubPressure { get; set; }
        /// <summary>
        /// 前阀开启度
        /// </summary>
        public float Open_A { get; set; }
        /// <summary>
        /// 后阀开启度
        /// </summary>
        public float Open_B { get; set; }
    }
    /// <summary>
    /// 方桥二期控流站
    /// </summary>
    public class FangQiao2
    {
        /// <summary>
        /// A阀门调节
        /// </summary>
        public bool ACtrl { get; set; }
        /// <summary>
        /// B阀门调节
        /// </summary>
        public bool BCtrl { get; set; }
        /// <summary>
        /// 自动调节
        /// </summary>
        public bool AutoCtrl { get; set; }
        /// <summary>
        /// 前压
        /// </summary>
        public float Pressure_A { get; set; }
        /// <summary>
        /// 后压
        /// </summary>
        public float Pressuer_B { get; set; }
        /// <summary>
        /// 前后压差
        /// </summary>
        public float SubPressure { get; set; }
        /// <summary>
        /// 前阀开启度
        /// </summary>
        public float Open_A { get; set; }
        /// <summary>
        /// 后阀开启度
        /// </summary>
        public float Open_B { get; set; }
    }
    /// <summary>
    /// 光华控流站
    /// </summary>
    public class GuangHua
    {
        /// <summary>
        /// A阀门调节
        /// </summary>
        public bool ACtrl { get; set; }
        /// <summary>
        /// B阀门调节
        /// </summary>
        public bool BCtrl { get; set; }
        /// <summary>
        /// 自动调节
        /// </summary>
        public bool AutoCtrl { get; set; }
        /// <summary>
        /// 前压
        /// </summary>
        public float Pressure_A { get; set; }
        /// <summary>
        /// 后压
        /// </summary>
        public float Pressuer_B { get; set; }
        /// <summary>
        /// 前后压差
        /// </summary>
        public float SubPressure { get; set; }
        /// <summary>
        /// 前阀开启度
        /// </summary>
        public float Open_A { get; set; }
        /// <summary>
        /// 后阀开启度
        /// </summary>
        public float Open_B { get; set; }
    }
    public enum Trend
    {
        上升=1,
        下降,
        平和
    }
    public enum DispacthMod
    {
        经济=1,
        安全,
        谨慎
    }
}
